package sd.qd.xiaoming.coffeedesk.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@XmlRootElement
public class CdIconList extends BaseEntity {

	private String name;
	private List<CdIcon> icons = new ArrayList<CdIcon>();

	@OneToMany(cascade = { CascadeType.ALL })
	public List<CdIcon> getIcons() {
		return this.icons;
	}

	public String getName() {
		return this.name;
	}

	public void setIcons(final List<CdIcon> icons) {
		this.icons = icons;
	}

	public void setName(final String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "CdIconList [name=" + this.name + ", icons=" + this.icons + "]";
	}

}
